from collections import Counter
from math import acos, sqrt, atan
import sys
sys.setrecursionlimit(10**6)


def f(a, b):
    if a == 'elephant':
        if b == 'mouse':
            return False
        if b == 'tiger':
            return True
        return True
    if a == 'tiger':
        if b == 'elephant':
            return False
        return True
    if a == 'cat':
        return b != 'tiger'
    return b != 'cat'


if __name__ == '__main__':
    # sys.stdin = open('1.std.in', 'r')
    a, b = input().split()
    print("tiangou yiwusuoyou" if f(a, b) else "tiangou txdy")





